package com.gxl.design.abstractfactorypattern.factory;

import com.gxl.design.abstractfactorypattern.production.glass.Aglass;
import com.gxl.design.abstractfactorypattern.production.glass.Bglass;
import com.gxl.design.abstractfactorypattern.production.glass.Cglass;
import com.gxl.design.abstractfactorypattern.production.glass.Glass;
import com.gxl.design.abstractfactorypattern.production.mirror.Mirror;

public class GlassFactory extends AbstractFactory {
    @Override
    public Glass getGlassProducer(String lever) {

        if (lever.equals("")||lever==null){
            return null;
        }

        if(lever.equals("A")){
            return new Aglass();
        }

        if (lever.equals("B")){
            return new Bglass();
        }
        if (lever.equals("C")){
            return new Cglass();
        }
        return null;
    }

    @Override
    public Mirror getMirrorProducer(String prod) {
        return null;
    }
}
